xen/arm: vgic: Sanitize target mask used to send SGI
authorJulien Grall <julien.grall@arm.com>
Tue, 6 Jun 2017 14:35:42 +0000 (15:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Jun 2017 12:47:07 +0000 (14:47 +0200)
commit6fb94196730f30929f1e617fd1d05daf55376664
tree9ba396d87ccb92074ce49efca01c184b17edac3e
parent11fc7ccb7217ccfb79edb727d1349618bcb0602d
xen/arm: vgic: Sanitize target mask used to send SGI

The current function vgic_to_sgi does not sanitize the target mask and
may therefore get an invalid vCPU ID. This will result to an out of
bound access of d->vcpu[...] as there is no check whether the vCPU ID is
within the maximum supported by the guest.

This was introduced by commit ea37fd2111 "xen/arm: split vgic driver
into generic and vgic-v2 driver".

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic.c